<?php defined('SYSPATH') or die('No direct script access.');

class Model_Airport extends ORM
{

    public function delete_clear()
    {
        $id = $this->id;
        $children = ORM::factory('airport')->where('pid','=',$id)->find_all();
        foreach($children as $child)
        {
            $child->delete_clear();
        }
        $this->delete();
    }
}